import React from 'react';
import {View, Text, Button} from "react-native";
import {useNavigation} from "@react-navigation/native";

function Home (){
    const navigation = useNavigation();
    return (
        <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
            <Text>Home Screen</Text>
            <Button title={'路由带参数'} onPress={()=>navigation.navigate('Test',{
                name: 'Test',
                age: 20})
            } />
        </View>
    )
}
export default Home
